package com.yonyou.ucf.mdf.app.isvdxq.other.model;

import com.alibaba.fastjson.JSONObject;
import com.yonyou.ucf.mdf.app.isvdxq.other.entity.ProductSKUEntity;

public class ProductSKUBean extends ProductSKUEntity {
    private Object showItem;
    private Object userdefAlias;

    public String getShowItem() {
        if(showItem == null) return null;
        if(showItem instanceof String) return showItem.toString();
        else{
            NameBean obj = JSONObject.parseObject( JSONObject.toJSONString(showItem), NameBean.class );
            return obj.getZh_CN();
        }
    }

    public void setShowItem(Object showItem) {
        this.showItem = showItem;
    }

    public String getUserdefAlias() {
        if(userdefAlias == null) return null;
        if(userdefAlias instanceof String) return userdefAlias.toString();
        else{
            NameBean obj = JSONObject.parseObject( JSONObject.toJSONString(userdefAlias), NameBean.class );
            return obj.getZh_CN();
        }
    }

    public void setUserdefAlias(Object userdefAlias) {
        this.userdefAlias = userdefAlias;
    }
}
